package testJdk.commonUse.array;

import org.junit.Test;

public class TwoDimensionalArrayTest {

    /**
     * 构造一个二维数组
     * 使用二维数组必然用到双重循环
     */
    @Test
    public void test01() {
        int[][] arr = new int[10][10];
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                arr[i][j] = 1;
                System.out.printf("%d\t", arr[i][j]);
            }
            System.out.println();
        }
    }
}
